package com.demo.resourcecode.c14boot;

import java.net.URL;

import org.springframework.boot.loader.LaunchedURLClassLoader;
import org.springframework.boot.loader.jar.JarFile;

public class JarLauncherTest2 {

	public static void main(String[] args) throws Exception {
		try {
            JarFile.registerUrlProtocolHandler();
            LaunchedURLClassLoader classLoader = new LaunchedURLClassLoader(
                new URL[] {
                		new URL("jar:file:/E:/workspace2018/spring_resource_demo/target/classes/BOOT-INF/lib/spring_resource_demo_client.jar!/BOOT-INF/lib/classmate-1.3.4.jar!/")
                },
                JarLauncherTest2.class.getClassLoader());

            System.out.println(classLoader.loadClass("com.fasterxml.classmate.Filter"));
        } catch (Exception e) {
            e.printStackTrace();
        }
	}

}
